package labox.innovation.gameserver.skills.conditions;

import labox.innovation.gameserver.model.actor.instance.FuzePcInstance;
import labox.innovation.gameserver.skills.Env;

/**
 * @author Kerberos
 * 
 **/
public class ConditionPlayerInvSize extends Condition {

	private final int _size;

	public ConditionPlayerInvSize(int size) {
		_size = size;
	}

	@Override
	public boolean testImpl(Env env) {
		if (env.player instanceof FuzePcInstance)
			return env.player.getInventory().getSize() <= (((FuzePcInstance) env.player).getInventoryLimit() - _size);
		return true;
	}
}
